inherited frmLayAdjustBill: TfrmLayAdjustBill
  Left = 445
  Top = 141
  Caption = #36135#20301#35843#25972#21333
  PixelsPerInch = 96
  TextHeight = 12
  inherited pnlDBCtrl: TPanel
    inherited pnlThirdtrade: TPanel
      inherited lblTTtraderid: TcxLabel
        AnchorX = 78
      end
      inherited cxLabel1: TcxLabel
        AnchorX = 263
      end
      inherited lblTTBalanceid: TcxLabel
        AnchorX = 471
      end
    end
    inherited lblName: TcxLabel
      Style.IsFontAssigned = True
    end
    inherited DtlPageCtrl: TcxPageControl
      inherited tabMain: TcxTabSheet
        object edtRecLay: TcxDBLookupComboBox
          Left = 464
          Top = 68
          DataBinding.DataField = 'reclayid'
          DataBinding.DataSource = dsDetail
          Properties.DropDownListStyle = lsEditList
          Properties.DropDownSizeable = True
          Properties.DropDownWidth = 160
          Properties.GridMode = True
          Properties.ImmediatePost = True
          Properties.KeyFieldNames = 'id'
          Properties.ListColumns = <
            item
              Caption = #36135#20301#32534#30721
              Width = 80
              FieldName = 'code'
            end
            item
              Caption = #21517#31216
              Width = 80
              FieldName = 'name'
            end>
          Properties.ListFieldIndex = 1
          Properties.ListOptions.SyncMode = True
          Properties.ListSource = dsRecLay
          TabOrder = 1
          Visible = False
          Width = 145
        end
        object edtSendLay: TcxDBLookupComboBox
          Left = 464
          Top = 96
          DataBinding.DataField = 'sendlayid'
          DataBinding.DataSource = dsDetail
          Properties.DropDownListStyle = lsEditList
          Properties.DropDownSizeable = True
          Properties.DropDownWidth = 200
          Properties.GridMode = True
          Properties.ImmediatePost = True
          Properties.KeyFieldNames = 'id'
          Properties.ListColumns = <
            item
              Caption = #36135#20301#32534#30721
              Width = 60
              FieldName = 'code'
            end
            item
              Caption = #21517#31216
              Width = 80
              FieldName = 'name'
            end
            item
              Caption = #25968#37327
              Width = 50
              FieldName = 'quantity'
            end>
          Properties.ListFieldIndex = 1
          Properties.ListOptions.SyncMode = True
          Properties.ListSource = dsSendLay
          TabOrder = 2
          Visible = False
          Width = 145
        end
      end
      inherited tsSum: TcxTabSheet
        ExplicitWidth = 872
        ExplicitHeight = 200
      end
    end
    inherited lblPrinted: TcxLabel
      Style.IsFontAssigned = True
    end
    inherited dynlblCreate_by: TcxLabel
      AnchorX = 221
    end
    inherited dynlblCheck_by: TcxLabel
      AnchorX = 429
    end
    inherited dynlblFilid: TcxLabel
      AnchorX = 88
    end
    inherited dynlblDeptid: TcxLabel
      AnchorX = 301
    end
    inherited dynlblEmpid: TcxLabel
      AnchorX = 505
    end
    inherited dynlblBKind: TcxLabel
      AnchorX = 149
    end
  end
  inherited Panel1: TPanel
    inherited labFuncName: TcxLabel
      Style.IsFontAssigned = True
    end
    inherited labFuncDesc: TcxLabel
      Style.IsFontAssigned = True
    end
  end
  inherited pnlBottom: TPanel
    inherited lblDepotQty: TcxLabel
      Style.IsFontAssigned = True
    end
  end
  inherited cxStyleRepository1: TcxStyleRepository
    PixelsPerInch = 96
    inherited cxGridBandedTableViewStyleSheet1: TcxGridBandedTableViewStyleSheet
      BuiltIn = True
    end
  end
  object cdsRecLay: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'depotid'
        ParamType = ptInput
        Value = 0
      end>
    ProviderName = 'dspRecLay'
    Left = 664
    Top = 207
  end
  object cdsSendLay: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'depotid'
        ParamType = ptInput
        Value = 0
      end>
    ProviderName = 'dspSendLay'
    Left = 592
    Top = 215
  end
  object dspRecLay: TDataSetProvider
    DataSet = qryRecLay
    Left = 680
    Top = 185
  end
  object dspSendLay: TDataSetProvider
    DataSet = qrySendLay
    Left = 588
    Top = 179
  end
  object dsSendLay: TDataSource
    DataSet = cdsSendLay
    Left = 596
    Top = 251
  end
  object dsRecLay: TDataSource
    DataSet = cdsRecLay
    Left = 680
    Top = 255
  end
  object qrySendLay: TUniQuery
    Connection = MainDM.UniConn
    SQL.Strings = (
      ''
      
        'select a.id,a.name,a.code,a.depotid,b.productid,u.unitname,b.qua' +
        'ntity'
      '  from td_lay a'
      '  left join tt_booklay b on b.layid=a.id and b.depotid=a.depotid'
      
        '  left join td_unitprice u on u.productid=b.productid and u.base' +
        'unit=1'
      '  where a.depotid=:depotid and (len(a.subcode)>2) '
      
        '    and (select count(*) from td_lay l where l.subcode like a.su' +
        'bcode+'#39'%'#39')=1')
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 592
    Top = 145
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'depotid'
        Value = nil
      end>
  end
  object qryRecLay: TUniQuery
    Connection = MainDM.UniConn
    SQL.Strings = (
      ''
      'select a.id,a.name,a.code,a.depotid'
      '  from td_lay a'
      '  left join tt_booklay b on b.layid=a.id and b.depotid=a.depotid'
      '  where a.depotid=:depotid and (len(a.subcode)>2) '
      
        '    and (select count(*) from td_lay l where l.subcode like a.su' +
        'bcode+'#39'%'#39')=1'
      '  group by a.id,a.name,a.code,a.depotid')
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 668
    Top = 149
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'depotid'
        Value = nil
      end>
  end
end
